package com.dc.common.utils;

import com.dc.common.aspectj.DataScopeAspect;
import com.dc.common.core.BaseParamDto;
import org.apache.commons.lang3.ObjectUtils;

/**
 * @author zhuangcy
 * @date 2021/6/28
 * @description object工具类
 */
public class ObjectUtil extends ObjectUtils {
    /**
     * 获取权限sql
     *
     * @param dto
     * @return
     */
    public static String getDataScopeSql(BaseParamDto dto) {
        Object sql = dto.getParams().get(DataScopeAspect.DATA_SCOPE_SQL);
        if (null == sql) {
            return null;
        } else {
            return sql.toString();
        }
    }
}
